<?php
namespace api\home\controller;

use think\Db;
use think\Validate;
use cmf\controller\RestBaseController;
use app\common\model\VersionModel;
use app\common\model\UserVersionModel;
use app\common\logic\home\version;
//版本
class VersionController extends RestBaseController
{
	/**
	 * [版本检测]
	 * @param [type]  uuid  [description]
	 * @return [type] type [1 安卓 2 ios]
	 * @return [type] wgtVer [版本信息]
	 * @return [type] [description]
	 */
	public function index(version $version){
		$param = $this->request->param();
		if(empty($param['type'])){
			$param['type'] = 1;
		}
		$rs = $version->index($param);
		$this->success('',$rs);
	}
	/**
	 * [增加拒绝次数]
	 * @param [type]  uuid  [description]
	 * @return [type] [description]
	 */
	public function add(version $version){
		$param = $this->request->param();
		$rs = $version->add($param);
		$this->success('',$rs);
	}
}
